package com.imooc.restaurant.config;


import com.imooc.restaurant.service.OrderMessageRestaurantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class RabbitConfig  {
    @Autowired
    private OrderMessageRestaurantService orderMessageService;

    @PostConstruct
    public void startListenMassage() {
        orderMessageService.handleMsg();
    }
}
